package com.david.cloud.user.service.impl;

import com.david.cloud.service.TokenService;
import com.david.cloud.user.entity.Token;
import com.david.cloud.user.service.ITokenService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class RpcTokenServiceImpl implements TokenService {
    @Autowired
    private ITokenService iTokenService;

    //存在返回true
    @Override
    public Boolean getByToken(String token) {
        Token t = iTokenService.getByToken(token);
        return t != null;
    }
}
